#!/usr/bin/env python

from distutils.core import setup
import os, sys
import string


def check_dependencies():
    """ Make sure we have python and pyQt with their
    proper versions installed.
    """

    # python 
    if sys.version_info < (2, 6, 0) or sys.version_info >= (2, 8, 0):
        print('Sorry, caliente needs python version 2.6 or 2.7')
        print("Python Version detected: %d.%d.%d" % sys.version_info[:3])
        exit(5)
    print("Python Version: %d.%d.%d" % sys.version_info[:3])
    
    try:
        from PyQt4.QtCore import qVersion
    except ImportError as msg:
        print('Sorry, please install PyQt4.')
        print('Error: %s' % msg)
        exit(1)
    print("Found PyQt")



if __name__ == "__main__":

    check_dependencies()
    
    setup(name='caliente',
        version='0.1.0_a1',
        description='Simple Calendar Application',
        author='Markus Dittrich',
        author_email='haskelladdict@gmail.com',
        url='https://code.google.com/p/caliente/',
        license='GNU GPLv3',
        packages=['caliente', 'caliente.db', 'caliente.gui'], 
        scripts=['caliente.pyw']
        )
